﻿@{
    ViewBag.Title = "Ask Wizard";
}

<div class="col-lg-9 col-sm-9 right_part">

    @*Header not show in case of Android App. *@
    @if (Session[HomeCareLibrary.Constants.SessionConstants.MODE] == null || Session[HomeCareLibrary.Constants.SessionConstants.MODE].ToString() == HomeCareLibrary.Constants.ApplicationModeConstants.IPHONE_APP || Session[HomeCareLibrary.Constants.SessionConstants.MODE].ToString() == HomeCareLibrary.Constants.ApplicationModeConstants.IPAD_APP)
    { 
        <div class="title clearfix">
            <h1>Ask a Wizard</h1>
            <div class="top-btn-per clearfix">
                <div id="back-button" class="back-button">
                    <a href="javascript:void(0);">
                        <img class="back-btn" alt="back-btn" src="@Url.Content("~/images/personalization-images/back-btn.png")">
                        <div class="back-mob-btn"><span class="glyphicon glyphicon-chevron-left"></span>Back</div>
                    </a>
                </div>
            </div>
        </div>
    }

    <div class="main-content">
        @{
            var sessionValue = "";
            if (Session[HomeCareLibrary.Constants.SessionConstants.MODE] != null)
            {
                sessionValue = Session[HomeCareLibrary.Constants.SessionConstants.MODE].ToString();
            }
            else
            {
                sessionValue = "";
            }
            <input type="hidden" value="@sessionValue" id="hdnSessionValue" />
        }
        <div class="ask_wizard_main">
            <div class="ask_wizard_data">

                <div class="ask_wizard_img">
                    <img alt="ask_wizard_girl" class="img-responsive" src="@Url.Content("~/images/ask_wizard_girl.jpg")"></div>
                <div class="wizard_content">
                    <span class="wizard_text">If you have a home care question,<br>
                        there are <strong>3 ways</strong> you can get an answer:</span>
                    <div class="ask_tabs">
                        <ul class="nav nav-tabs" id="myTab">
                            <li class="active"><a data-toggle="tab" href="#askwizardtab1">Check Previous
                                <br>
                                Q & A's</a></li>
                            <li class=""><a data-toggle="tab" href="#askwizardtab2">Search the
                                <br>
                                Home Wizard Site</a></li>
                            <li class=""><a data-toggle="tab" href="#askwizardtab3">Submit 
 <br>
                                New Question
                            </a></li>
                        </ul>
                        <div class="tab-content" id="myTabContent">
                            <div id="askwizardtab1" class="tab-pane fade active in">
                                <p>Your question may have been previously answered by one of our experts. To check, just select the topic for your question below:</p>
                                <br>
                                <br>
                                <select class="form-control" data-role="none">
                                    <option>-Select your topic-</option>
                                    <option>Topic 1</option>
                                    <option>Topic 2</option>
                                    <option>Topic 3</option>
                                </select>
                            </div>
                            <div id="askwizardtab2" class="tab-pane fade">
                                <p>
                                    Your question may be addressed somewhere else in
                            the Home Wizard website. You can search the Home
                            Wizard site below:
                                </p>
                                <div class="SearchHomeWizard">
                                    <form class="form-inline" role="form">
                                        <div class="form-group">
                                            <label class="sr-only" for="exampleInputtxt2">Text</label>
                                            <input type="text" class="form-control" id="exampleInputtxt2" placeholder="Search Home-Wizard website">
                                            <button type="button" class="btn btn-grey">Search</button>
                                        </div>

                                        <br>
                                        <br>
                                        <p class="text-center">
                                            <img src="@Url.Content("~/images/google-.png")" /></p>
                                    </form>
                                </div>
                            </div>
                            <div id="askwizardtab3" class="tab-pane fade">
                                @if (Session[HomeCareLibrary.Constants.SessionConstants.USER_ID] == null)
                                {
                                    <p>
                                        Welcome <strong>Guest</strong><br>
                                        You are not logged in. You can <a href="@Url.Action("Login", "Home")">login</a> or free <a href="@Url.Action("Initialsetup", "Home")">setup</a>.
                                    </p>
                                    <p>
                                        If you have been setup with Home Wizard <strong>for at least 3 months</strong>, then type your question below. 
                            We'll send you an answer usually within 48 hours.
                                    </p>
                                }
                                @if (Session[HomeCareLibrary.Constants.SessionConstants.MODE] == null)
                                {

                                    if (Session[HomeCareLibrary.Constants.SessionConstants.USER_NAME] != null)
                                    {
                                        string getUserName = @Session[HomeCareLibrary.Constants.SessionConstants.USER_NAME].ToString();
                                        string[] splitUserName = getUserName.Split('@');
                           
                                    <p>Welcome <strong>@splitUserName[0]</strong><br>
                                        <br>
                                        Type your question below. We'll send you an answer, usually within 48 hours.</p>
                              
                                    }

                                }
                                else
                                {
                                    if (Session[HomeCareLibrary.Constants.SessionConstants.USER_NAME] != null)
                                    { 
                                    <p>Type your question below. We'll send you an answer, usually within 48 hours.</p>
                                    }
                                }
                                <div class="SearchNewQues">
                                    <textarea class="form-control" rows="3" placeholder="Your Question . . ."></textarea>
                                    <input type="text" class="form-control" placeholder="- email address -">
                                    <div class="text-right">
                                        <button type="submit" class="btn btn-grey">Submit</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>


    </div>
</div>
@section script {

    <script src="@Url.Content("~/js/iPhone/IPhoneExtras.js")"></script>
}

<script>
    $(function () {
        $('#myTab a').click(function (e) {
            e.preventDefault()
            $(this).tab('show');
        });
    });

</script>
